package com.heisen.database.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heisen.database.entity.IBaseEntity;
import com.heisen.database.entity.PageQuery;
import com.heisen.database.mapper.SuperBaseMapper;
import com.heisen.database.service.ISuperService;
import org.springframework.stereotype.Service;

/**
 * @author sen
 * @description
 * @date 2024/1/11 17:43
 */
@Service
public class SuperServiceImpl <M extends SuperBaseMapper<T,Q>, T, Q extends PageQuery> extends ServiceImpl<M, T> implements ISuperService<T,Q> {

    /**
     *  分页查询
     * @param pageQuery   查询对象
     * @return
     */
    @Override
    public IPage<T> doPage(Q pageQuery) {
        return  this.baseMapper.doPage(new Page(pageQuery.getPageNo(), pageQuery.getPageSize()), pageQuery);
    }



}
